//
//  LCSendTextSelfCell.m
//  安好医生端
//
//  Created by 付国强 on 14-8-15.
//  Copyright (c) 2014年 lianchuangbrother. All rights reserved.
//
#import <QuartzCore/QuartzCore.h>
#import "LCSendTextSelfCell.h"

@implementation LCSendTextSelfCell

- (void)awakeFromNib
{
    // Initialization code
    
}


- (void)addTarget
{
    UILongPressGestureRecognizer *longPress=[[UILongPressGestureRecognizer alloc]initWithTarget:self action:@selector(dolongPress:)];
    self.backImageView.userInteractionEnabled=YES;
    [self.backImageView addGestureRecognizer:longPress];
}
- (void)setSelected:(BOOL)selected animated:(BOOL)animated
{
    [super setSelected:selected animated:animated];

}
- (void)dolongPress:(UILongPressGestureRecognizer *)recognizer
{
    if (recognizer.state == UIGestureRecognizerStateBegan) {
        
        [self.backImageView becomeFirstResponder];
        UIMenuController *menu = [UIMenuController sharedMenuController];
        [menu setTargetRect:self.backImageView.frame inView:self];
        [menu setMenuVisible:YES animated:YES];
        
        NSLog(@"------%D",[self.contentLabel isFirstResponder]);
    }
}
- (void)flag:(id)sender {
}

- (void)approve:(id)sender {
}
-(BOOL)canPerformAction:(SEL)action withSender:(id)sender{
    if (action == @selector(flag:)||action == @selector(approve:) ){
        return YES;
    }
    return NO;

}
@end
